<?php

namespace WinZ\DataMinerBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * GoldDelta
 * @ORM\Table(name="gold_audit")
 * @ORM\Entity
 */
class GoldDelta
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\Column(type="datetime", nullable=false)
     */
    private $dt;
    
    /**
     * @var integer
     *
     * @ORM\Column(name="delta", type="integer", nullable=false)
     */
    private $delta = 0;

    /**
    * @ORM\ManyToOne(targetEntity="Character", inversedBy="goldDeltas")
    * @ORM\JoinColumn(nullable=false,onDelete="CASCADE")
    */
    private $character;
    
    
    public function __construct() {
        $this->setDt(new \DateTime());
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set dt
     *
     * @param \DateTime $dt
     * @return GoldDelta
     */
    public function setDt($dt)
    {
        $this->dt = $dt;
    
        return $this;
    }

    /**
     * Get dt
     *
     * @return \DateTime 
     */
    public function getDt()
    {
        return $this->dt;
    }

    /**
     * Set delta
     *
     * @param integer $delta
     * @return GoldDelta
     */
    public function setDelta($delta)
    {
        $this->delta = $delta;
    
        return $this;
    }

    /**
     * Get delta
     *
     * @return integer 
     */
    public function getDelta()
    {
        return $this->delta;
    }

    /**
     * Set character
     *
     * @param \WinZ\DataMinerBundle\Entity\Character $character
     * @return GoldDelta
     */
    public function setCharacter(\WinZ\DataMinerBundle\Entity\Character $character)
    {
        $this->character = $character;
    
        return $this;
    }

    /**
     * Get character
     *
     * @return \WinZ\DataMinerBundle\Entity\Character 
     */
    public function getCharacter()
    {
        return $this->character;
    }
}